package com.le.tester.javaThink.fifth.chapter18_Str;

import java.util.Scanner;

/**
 * createTime：2021/8/17 11:01
 * description：根据空白字符对输入进行分词
 */
public class ScannerDelimiter {
    public static void main(String[] args) {
        Scanner scanner = new Scanner("12, 42, 78, 99, 42");
        scanner.useDelimiter("\\s*,\\s*");
        while (scanner.hasNext()) {
            System.out.print(scanner.nextInt() + " ");
        }
    }
}
